import actionRequest from '@/utils/request.ts'

export const login = (data: {
  code: string
}): Promise<{
  access_token: string
  token_type: string
}> => {
  return actionRequest({
    url: '/v1/oauth/access-token',
    method: 'post',
    data
  })
}
export const refreshToken = (): Promise<{
  access_token: string
  token_type: string
}> => {
  return actionRequest({
    url: '/v1/oauth/refresh-access-token',
    method: 'post'
  })
}
